#ifndef RANDOMGENERATOR_H
#define RANDOMGENERATOR_H
#include <QWidget>
#include <QPainter>
#include <QtCore>
#include <QString>
#include <QObject>
#include <QMainWindow>

//Do not change these. I may move them around if I find out they are in the wrong place.

static const QString MARKET_OPEN= "09:30:00";  //9:30am
static const QString MARKET_CLOSE= "16:00:00";  //4pm

class RandomGenerator : public QObject
{
    Q_OBJECT

public:
    RandomGenerator();
    bool generateRandom(QString fileString, QString stockCode);

private slots:
    void receiveChangeFromUI(QString stockCode);

private:
    //change to suit your needs in producing random stock prices if you must
    static const int MAX_SEC=59;
    static const int STOCK_PRICE_MAX=299;
    static const int STOCK_PRICE_DEC_MAX=100;//for example, if 100 is picked, in the code this will translate to a range of 0-99.
    //it will then be divided by 10 getting a decimal between 0.0 and 9.9

signals:

    void stockUpToDate(bool isUpToDate);
};

#endif // RANDOMGENERATOR_H
